CREATE TABLE [dbo].[TDFLUJ_PROY]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[NU_ANIO] [dbo].[TD_IN_004_ANOS] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDFLUJ_PR__NU_SE__5AA469F6] DEFAULT ((0)),
[CO_ARUB] [dbo].[TD_VC_003] NOT NULL,
[CO_RUBR] [dbo].[TD_VC_003] NOT NULL,
[CO_CLSU] [dbo].[TD_VC_003] NOT NULL,
[IM_SALD_INIC] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDFLUJ_PR__IM_SA__5B988E2F] DEFAULT ((0)),
[IM_CALC_ME01] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDFLUJ_PR__IM_CA__5C8CB268] DEFAULT ((0)),
[IM_CALC_ME02] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDFLUJ_PR__IM_CA__5D80D6A1] DEFAULT ((0)),
[IM_CALC_ME03] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDFLUJ_PR__IM_CA__5E74FADA] DEFAULT ((0)),
[IM_CALC_ME04] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDFLUJ_PR__IM_CA__5F691F13] DEFAULT ((0)),
[IM_CALC_ME05] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDFLUJ_PR__IM_CA__605D434C] DEFAULT ((0)),
[IM_CALC_ME06] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDFLUJ_PR__IM_CA__61516785] DEFAULT ((0)),
[IM_CALC_ME07] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDFLUJ_PR__IM_CA__62458BBE] DEFAULT ((0)),
[IM_CALC_ME08] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDFLUJ_PR__IM_CA__6339AFF7] DEFAULT ((0)),
[IM_CALC_ME09] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDFLUJ_PR__IM_CA__642DD430] DEFAULT ((0)),
[IM_CALC_ME10] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDFLUJ_PR__IM_CA__6521F869] DEFAULT ((0)),
[IM_CALC_ME11] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDFLUJ_PR__IM_CA__66161CA2] DEFAULT ((0)),
[IM_CALC_ME12] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDFLUJ_PR__IM_CA__670A40DB] DEFAULT ((0)),
[FA_TIPO_CAMB] [dbo].[TD_NU_015_006] NULL,
[CO_MONE] [dbo].[TD_VC_003] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TDFLUJ_PR__CO_US__67FE6514] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TDFLUJ_PR__FE_US__68F2894D] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TDFLUJ_PR__CO_US__69E6AD86] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TDFLUJ_PR__FE_US__6ADAD1BF] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDFLUJ_PROY] WITH NOCHECK ADD CONSTRAINT [CK__TDFLUJ_PR__NU_AN__59B045BD] CHECK NOT FOR REPLICATION (([NU_ANIO]>(1980)))
GO
ALTER TABLE [dbo].[TDFLUJ_PROY] ADD CONSTRAINT [PK__TDFLUJ_P__D891707D65D6F0D7] PRIMARY KEY CLUSTERED  ([CO_EMPR], [NU_ANIO], [NU_SECU], [CO_ARUB], [CO_RUBR], [CO_CLSU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDFLUJ_PROY] ADD CONSTRAINT [FK__TDFLUJ_PROY__50C6C558] FOREIGN KEY ([CO_EMPR], [CO_ARUB], [CO_RUBR], [CO_CLSU]) REFERENCES [dbo].[TCCLAS_SUBR] ([CO_EMPR], [CO_ARUB], [CO_RUBR], [CO_CLSU])
GO
ALTER TABLE [dbo].[TDFLUJ_PROY] ADD CONSTRAINT [FK__TDFLUJ_PROY__4FD2A11F] FOREIGN KEY ([CO_EMPR], [NU_ANIO], [NU_SECU]) REFERENCES [dbo].[TCFLUJ_PROY] ([CO_EMPR], [NU_ANIO], [NU_SECU])
GO
